Scenario #9522: Users of a Group Can View Hosting Assets Below the Assumed Project

This scenario verifies which hosting assets are visible to a user whose JWT contains a GROUP Subject.

Properties

Required

Given

name value
nameOfGroupSubject /xyz-Service
nameOfUserSubject tst-drew_selfregistered
projectCaption D-1000111 default project

Prerequisite: Resolving the project’s UUID

In a real-world scenario, there could be multiple results and the user has to select the correct one.

HTTP GET "/api/hs/booking/projects" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "comment" : "any user which does not even need to have any roles granted yet",` \
  `#   "sub" : "uuid<tst-drew_selfregistered>",` \
  `#   "groups" : [` \
  `#     "/xyz-Service"` \
  `#   ]` \
  `# }`
=> status: 200 OK 
[ {
  "uuid" : "5fa37d27-be9c-4e95-8f3d-c9c850a5bcdc", // projectUuid
  "caption" : "D-1000111 default project"
} ]

Fetch visible hosting assets via assigned group

The group ‘/xyz-Service’ has the role ‘hs_booking.project#5fa37d27-be9c-4e95-8f3d-c9c850a5bcdc:ADMIN’. // projectUuid The user ‘tst-drew_selfregistered’ is a member of the group ‘/xyz-Service’. Therefore, hosting assets below the booking project ‘D-1000111 default project’ are expected to be visible.

HTTP GET "/api/hs/hosting/assets?projectUuid=5fa37d27-be9c-4e95-8f3d-c9c850a5bcdc" // projectUuid \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "comment" : "any user which does not even need to have any roles granted yet",` \
  `#   "sub" : "uuid<tst-drew_selfregistered>",` \
  `#   "groups" : [` \
  `#     "/xyz-Service"` \
  `#   ]` \
  `# }` \
  -H 'Hostsharing-Assumed-Roles: hs_booking.project#5fa37d27-be9c-4e95-8f3d-c9c850a5bcdc:ADMIN' // projectUuid
=> status: 200 OK 
[ {
  "uuid" : "1f1f8dbe-e80d-41ef-bfcd-d04721891647",
  "type" : "MANAGED_WEBSPACE",
  "identifier" : "fir01",
  "caption" : "some Webspace",
  "alarmContact" : null,
  "config" : { }
}, {
  "uuid" : "8247e98f-3354-4947-95ac-3357559c600d",
  "type" : "MANAGED_SERVER",
  "identifier" : "vm1011",
  "caption" : "some ManagedServer",
  "alarmContact" : null,
  "config" : {
    "monit_max_ram_usage" : 80,
    "monit_max_ssd_usage" : 70,
    "monit_max_cpu_usage" : 90
  }
} ]

generated on 2026-08-10 04:34:19 for branch HEAD